<?xml version="1.0" encoding="UTF-8"?>
<!-- 
    Document   : EmpresaCadastrar
    Created on : 12/02/2009, 15:50:39
    Author     : Jaime Junior
-->
<jsp:root version="2.1" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ice="http://www.icesoft.com/icefaces/component" xmlns:jsp="http://java.sun.com/JSP/Page">
    <jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
    <f:view>
        <ice:outputHtml id="outputHtml1">
            <ice:outputHead id="outputHead1">
                <ice:outputStyle href="./resources/stylesheet.css" id="outputStyle1"/>
                <ice:outputStyle href="./resources/camposDesabilitados.css" id="outputStyle3"/>
                <ice:outputStyle href="./xmlhttp/css/xp/xp.css" id="outputStyle2"/>
                <script>
               function mascara(o,f){
                  v_obj=o;
                  v_fun=f;
                  setTimeout("execmascara()",1);
               }

               function execmascara(){
                  v_obj.value=v_fun(v_obj.value);
               }

               function telefone(v){
                  v=v.replace(/\D/g,"")
                  v=v.replace(/^(\d\d)(\d)/g,"($1) $2")
                  v=v.replace(/(\d{4})(\d)/,"$1-$2")
                  return v
               }

               function validaNumeros(v){

                  v=v.replace(/\D/g,"")

                  return v;
               }

               function soLetras(v){
                  v= v.replace(/\d/,'');
                  v= v.replace(/\,|\.|\%|\¨|\[|\]|\{|\}|\$|\;|\:|\+|\*|\@|\!|\#|\(|\)|\-|\_|\=|\+|\?|\/|\\|\"|\&amp;/,'');
                  return v;
               }

               function hidden(){
                  document.body.style.overflow='hidden';
               }

            </script>
                <title> Gerenciamento de Motoristas</title>
            </ice:outputHead>
            <body onload="hidden()">
                <ice:outputBody id="outputBody1" style="-rave-layout: grid">
                    <ice:form id="form1">
                        <ice:panelPopup autoCentre="true" binding="#{Motoristas$CaminhoneiroCadastrar.painelSair}" draggable="false" id="painelSair"
                            modal="true" rendered="#{Motoristas$CaminhoneiroCadastrar.panelPopup1Bean2.showDraggablePanel}"
                            style="height: 210px; left: 720px; right: 200px; top: 264px; bottom: 200px; position: absolute; width: 405px" visible="#{Motoristas$CaminhoneiroCadastrar.panelPopup1Bean2.showModalPanel}">
                            <f:facet name="header">
                                <ice:panelGrid id="painelSairCabecalho" style="display: block; height: 30px; width: 180px">
                                    <ice:outputText id="msgSairTitulo" value="Sair"/>
                                </ice:panelGrid>
                            </f:facet>
                            <f:facet name="body">
                                <ice:panelLayout id="painelSairCorpo" layout="flow" style="display: block; height: 180px; position: absolute; width: 405px; -rave-layout: grid">
                                    <ice:outputText binding="#{Motoristas$CaminhoneiroCadastrar.msgPainelSair}" id="msgPainelSair"
                                        style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 18px; left: 24px; top: 24px; position: absolute; text-align: center; width: 357px" value="Tem certeza que deseja sair dessa tela?"/>
                                    <ice:commandButton action="#{Motoristas$CaminhoneiroCadastrar.botaoSairSim_action}"
                                        binding="#{Motoristas$CaminhoneiroCadastrar.botaoSairSim}" id="botaoSairSim" image="/resources/botaoSim.png"
                                        immediate="true"
                                        style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 16px; left: 30%; top: 55%; position: absolute" value="Sim"/>
                                    <ice:commandButton action="#{Motoristas$CaminhoneiroCadastrar.botaoSairNao_action}"
                                        binding="#{Motoristas$CaminhoneiroCadastrar.botaoSairNao}" id="botaoSairNao" image="/resources/botaoNao.png"
                                        immediate="true"
                                        style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 16px; right: 30%; top: 55%; position: absolute" value="Não"/>
                                </ice:panelLayout>
                            </f:facet>
                        </ice:panelPopup>
                        <ice:panelPopup autoCentre="true" binding="#{Motoristas$CaminhoneiroCadastrar.painelConsulta}" draggable="false" id="painelConsulta"
                            modal="true" rendered="#{Motoristas$CaminhoneiroCadastrar.panelPopup1Bean1.showDraggablePanel}"
                            style="height: 210px; left: 720px; top: 288px; position: absolute; width: 405px" visible="#{Motoristas$CaminhoneiroCadastrar.panelPopup1Bean1.showModalPanel}">
                            <f:facet name="header">
                                <ice:panelGrid id="painelConsultaCabecalho" style="display: block; height: 30px; width: 180px">
                                    <ice:outputText id="msgPainelConsulta" value="Consulta Motorista"/>
                                </ice:panelGrid>
                            </f:facet>
                            <f:facet name="body">
                                <ice:panelLayout id="painelConsultaCorpo" layout="flow" style="display: block; height: 180px; position: absolute; width: 405px; -rave-layout: grid">
                                    <ice:outputText id="msgConsultaTitulo"
                                        style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 18px; left: 24px; top: 0px; position: absolute; text-align: center; width: 357px" value="Digite o nome do motorista a ser consultado:"/>
                                    <ice:commandButton action="#{Motoristas$CaminhoneiroCadastrar.botaoConsultaOk_action}"
                                        binding="#{Motoristas$CaminhoneiroCadastrar.botaoConsultaOk}" id="botaoConsultaOk" image="/resources/botaoOk.png"
                                        immediate="true"
                                        style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 16px; left: 25%; top: 65%; position: absolute" value="OK"/>
                                    <ice:commandButton action="#{Motoristas$CaminhoneiroCadastrar.botaoConsultaCancelar_action}"
                                        binding="#{Motoristas$CaminhoneiroCadastrar.botaoConsultaCancelar}" id="botaoConsultaCancelar"
                                        image="/resources/botaoCancelar.png" immediate="true" partialSubmit="true"
                                        style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 16px; right: 25%; top: 65%; position: absolute" value="Cancelar"/>
                                    <ice:selectInputText binding="#{Motoristas$CaminhoneiroCadastrar.campoBuscaMotorista}" id="campoBuscaMotorista"
                                        immediate="true" partialSubmit="true"
                                        style="font-family: Verdana,Arial,Helvetica,sans-serif; left: 48px; top: 48px; position: absolute"
                                        valueChangeListener="#{Motoristas$CaminhoneiroCadastrar.campoBuscaMotorista_processValueChange}" width="309">
                                        <f:selectItems id="selectInputText1selectedItems" value="#{Motoristas$CaminhoneiroCadastrar.campoConsultaMotorista}"/>
                                    </ice:selectInputText>
                                </ice:panelLayout>
                            </f:facet>
                        </ice:panelPopup>
                        <ice:panelPopup autoCentre="true" binding="#{Motoristas$CaminhoneiroCadastrar.painelAviso}" draggable="false" id="painelAviso"
                            modal="true" rendered="#{Motoristas$CaminhoneiroCadastrar.panelPopup1Bean.showDraggablePanel}"
                            style="height: 210px; left: 720px; top: 312px; position: absolute; width: 405px" visible="#{Motoristas$CaminhoneiroCadastrar.panelPopup1Bean.showModalPanel}">
                            <f:facet name="header">
                                <ice:panelGrid id="painelAvisoCabecalho" style="display: block; height: 30px; width: 180px">
                                    <ice:outputText id="msgPainelAviso" value="Aviso"/>
                                </ice:panelGrid>
                            </f:facet>
                            <f:facet name="body">
                                <ice:panelLayout id="painelAvisoCorpo" layout="flow" style="display: block; height: 180px; position: absolute; width: 405px; -rave-layout: grid">
                                    <ice:outputText binding="#{Motoristas$CaminhoneiroCadastrar.msgAvisoResultado}" id="msgAvisoResultado"
                                        style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 18px; height: 17px; left: 24px; top: 24px; position: absolute; text-align: center; width: 357px" value="Não houve resultado "/>
                                    <ice:outputText binding="#{Motoristas$CaminhoneiroCadastrar.msgAvisoPergunta}" id="msgAvisoPergunta"
                                        style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 18px; height: 17px; left: 24px; top: 72px; position: absolute; text-align: center; width: 357px" value="Deseja fazer outra consulta?"/>
                                    <ice:commandButton action="#{Motoristas$CaminhoneiroCadastrar.botaoAvisoNao_action}"
                                        binding="#{Motoristas$CaminhoneiroCadastrar.botaoAvisoNao}" id="botaoAvisoNao" image="/resources/botaoNao.png"
                                        immediate="true" partialSubmit="true"
                                        style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 16px; right: 30%; top: 65%; position: absolute" value="Não"/>
                                    <ice:commandButton action="#{Motoristas$CaminhoneiroCadastrar.botaoAvisoSim_action}" id="botaoAvisoSim"
                                        image="/resources/botaoSim.png" immediate="true"
                                        style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 16px; left: 30%; top: 65%; position: absolute" value="Sim"/>
                                </ice:panelLayout>
                            </f:facet>
                        </ice:panelPopup>
                        <ice:panelPopup autoCentre="true" binding="#{Motoristas$CaminhoneiroCadastrar.painelMensagem}" draggable="false" id="painelMensagem"
                            modal="true" rendered="#{Motoristas$CaminhoneiroCadastrar.panelPopup1Bean3.showDraggablePanel}"
                            style="height: 210px; left: 720px; top: 336px; position: absolute; width: 405px" visible="#{Motoristas$CaminhoneiroCadastrar.panelPopup1Bean3.showModalPanel}">
                            <f:facet name="header">
                                <ice:panelGrid id="painelMensagemCabecalho" style="display: block; height: 30px; width: 180px">
                                    <ice:outputText id="msgPainelMensagem" value="Atenção"/>
                                </ice:panelGrid>
                            </f:facet>
                            <f:facet name="body">
                                <ice:panelLayout id="painelMensagemCorpo" layout="flow" style="display: block; height: 180px; position: absolute; width: 405px; -rave-layout: grid">
                                    <ice:outputText binding="#{Motoristas$CaminhoneiroCadastrar.msgMensagemResultado}" id="msgMensagemResultado"
                                        style="font-family: 'Verdana','Arial','Helvetica',sans-serif; font-size: 18px; height: 17px; left: 24px; top: 24px; position: absolute; text-align: center; width: 357px" value="Operação Efetuada com Sucesso"/>
                                    <ice:outputText binding="#{Motoristas$CaminhoneiroCadastrar.msgMensagemOperacao}" id="msgMensagemOperacao" style="font-family: 'Verdana','Arial','Helvetica',sans-serif; font-size: 18px; height: 17px; left: 24px; top: 72px; position: absolute; text-align: center; width: 357px"/>
                                    <ice:commandButton action="#{Motoristas$CaminhoneiroCadastrar.botaoMensagemOk_action}"
                                        binding="#{Motoristas$CaminhoneiroCadastrar.botaoMensagemOk}" id="botaoMensagemOk" image="/resources/botaoOk.png"
                                        immediate="true"
                                        style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 16px; left: 45%; top: 70%; position: absolute" value="Ok"/>
                                </ice:panelLayout>
                            </f:facet>
                        </ice:panelPopup>
                        <ice:panelGroup dragListener="#{Motoristas$CaminhoneiroCadastrar.painelGeral_processMyEvent}" id="painelGeral" style="height: 768px; margin-left: -512px; left: 50%; top: 0px; position: absolute; width: 1024px">
                            <ice:graphicImage id="imagemFundo"
                                style="height: 768px; margin-left: -512px; left: 50%; top: 0px; position: absolute; width: 1024px" value="/resources/telaMotorista.jpg"/>
                            <ice:panelLayout id="painelConteudo" layout="flow" style="font-family: 'Courier New',Courier,monospace; font-size: 14px; height: 620px; left: 2%; top: 12%; position: absolute; width: 980px; -rave-layout: grid">
                                <ice:outputText id="labelEmpresa"
                                    style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 16px; left: 144px; top: 72px; position: absolute; text-align: right; width: 119px" value="Empresa:"/>
                                <ice:outputText id="labelNome"
                                    style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 16px; left: 144px; top: 96px; position: absolute; text-align: right; width: 119px" value="Nome:"/>
                                <ice:outputText id="labelCnh"
                                    style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 16px; left: 144px; top: 120px; position: absolute; text-align: right; width: 119px" value="CNH:"/>
                                <ice:outputText id="labelTelefone"
                                    style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 16px; left: 144px; top: 144px; position: absolute; text-align: right; width: 119px" value="Telefone:"/>
                                <ice:selectOneMenu binding="#{Motoristas$CaminhoneiroCadastrar.comboEmpresa}" id="comboEmpresa"
                                    style="font-family: Verdana,Arial,Helvetica,sans-serif; left: 262px; top: 70px; position: absolute; width: 230px"
                                    title="Selecione a empresa do motorista" value="#{Motoristas$CaminhoneiroCadastrar.empresaSelecionada.selectedObject}">
                                    <f:selectItems id="selectOneMenu1selectItems" value="#{Motoristas$CaminhoneiroCadastrar.empresas}"/>
                                </ice:selectOneMenu>
                                <ice:inputText binding="#{Motoristas$CaminhoneiroCadastrar.nome}" id="nome" maxlength="200" onkeypress="mascara(this,soLetras);"
                                    partialSubmit="true" required="true"
                                    style="font-family: Verdana,Arial,Helvetica,sans-serif; left: 262px; top: 94px; position: absolute; width: 230px"
                                    title="Digite o nome do Motorista" value="#{Motorista.nome}"/>
                                <ice:inputText binding="#{Motoristas$CaminhoneiroCadastrar.cnh}" id="cnh" maxlength="12"
                                    onkeypress="mascara(this,validaNumeros);" partialSubmit="true" required="true"
                                    style="font-family: Verdana,Arial,Helvetica,sans-serif; left: 262px; top: 118px; position: absolute; width: 230px"
                                    title="Informe o número da Carteira Nacional de Habilitação"
                                    validator="#{Motoristas$CaminhoneiroCadastrar.validateCampoUnico}" value="#{Motorista.cnh}"/>
                                <ice:inputText binding="#{Motoristas$CaminhoneiroCadastrar.telefone}" id="telefone" maxlength="14"
                                    onkeypress="mascara(this,telefone);" partialSubmit="true" required="true"
                                    style="font-family: Verdana,Arial,Helvetica,sans-serif; left: 262px; top: 142px; position: absolute; width: 230px"
                                    title="Informe o telefone do Motorista" value="#{Motorista.telefone}"/>
                                <ice:message binding="#{Motoristas$CaminhoneiroCadastrar.msgNome}" errorClass="errorMessage" fatalClass="fatalMessage"
                                    for="nome" id="msgNome" infoClass="infoMessage" showSummary="true"
                                    style="color: red; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; height: 20px; left: 504px; top: 96px; position: absolute; width: 262px" warnClass="warnMessage"/>
                                <ice:message binding="#{Motoristas$CaminhoneiroCadastrar.msgCnh}" errorClass="errorMessage" fatalClass="fatalMessage" for="cnh"
                                    id="msgCnh" infoClass="infoMessage"
                                    style="color: red; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; height: 20px; left: 504px; top: 120px; position: absolute; width: 262px" warnClass="warnMessage"/>
                                <ice:message binding="#{Motoristas$CaminhoneiroCadastrar.msgTelefone}" errorClass="errorMessage" fatalClass="fatalMessage"
                                    for="telefone" id="msgTelefone" infoClass="infoMessage" showSummary="true"
                                    style="color: red; font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; height: 20px; left: 504px; top: 144px; position: absolute; width: 262px" warnClass="warnMessage"/>
                                <ice:panelLayout id="painelOpcoes" layout="flow" style="height: 46px; left: 0px; top: 0px; position: absolute; width: 981px; -rave-layout: grid">
                                    <ice:commandButton action="#{Motoristas$CaminhoneiroCadastrar.botaoNovo_action}" alt="Novo"
                                        binding="#{Motoristas$CaminhoneiroCadastrar.botaoNovo}" id="botaoNovo" image="/resources/botaoNovo.png" immediate="true"
                                        style="height: 45px; left: 168px; top: 0px; position: absolute; width: 64px" title="Novo" value="Novo"/>
                                    <ice:commandButton action="#{Motoristas$CaminhoneiroCadastrar.botaoConsultar_action}"
                                        binding="#{Motoristas$CaminhoneiroCadastrar.botaoConsultar}" id="botaoConsultar" image="/resources/botaoConsultar.png"
                                        immediate="true" style="height: 45px; left: 240px; top: 0px; position: absolute; width: 64px" title="Consultar" value="Consultar"/>
                                    <ice:commandButton action="#{Motoristas$CaminhoneiroCadastrar.botaoAlterar_action}"
                                        binding="#{Motoristas$CaminhoneiroCadastrar.botaoAlterar}" id="botaoAlterar" image="/resources/botaoAlterar.png"
                                        immediate="true" style="height: 45px; left: 312px; top: 0px; position: absolute; width: 64px" title="Alterar" value="Alterar"/>
                                    <ice:commandButton action="#{Motoristas$CaminhoneiroCadastrar.botaoImprimir_action}"
                                        binding="#{Motoristas$CaminhoneiroCadastrar.botaoImprimir}" id="botaoImprimir" image="/resources/botaoImprimir.png"
                                        immediate="true" style="height: 45px; left: 384px; top: 0px; position: absolute; width: 64px" title="Imprimir" value="Imprimir"/>
                                    <ice:commandButton action="#{Motoristas$CaminhoneiroCadastrar.botaoCadastrar_action}"
                                        binding="#{Motoristas$CaminhoneiroCadastrar.botaoCadastrar}" id="botaoCadastrar" image="/resources/botaoSalvar.png"
                                        partialSubmit="true" style="height: 45px; left: 456px; top: 0px; position: absolute; width: 64px"
                                        title="Salvar/Cadastrar" value="Cadastrar"/>
                                    <ice:commandButton action="#{Motoristas$CaminhoneiroCadastrar.botaoLimpar_action}"
                                        binding="#{Motoristas$CaminhoneiroCadastrar.botaoLimpar}" id="botaoLimpar" image="/resources/botaoLimpar.png"
                                        immediate="true" style="height: 45px; left: 528px; top: 0px; position: absolute; width: 64px" title="Limpar Campos" value="Limpar"/>
                                    <ice:commandButton action="#{Motoristas$CaminhoneiroCadastrar.botaoSair_action}" id="botaoSair"
                                        image="/resources/botaoSair.png" immediate="true"
                                        style="height: 45px; left: 912px; top: 0px; position: absolute; width: 64px" title="Sair" value="Sair"/>
                                </ice:panelLayout>
                            </ice:panelLayout>
                        </ice:panelGroup>
                    </ice:form>
                </ice:outputBody>
            </body>
        </ice:outputHtml>
    </f:view>
</jsp:root>
